From 4df64bce834530ba51f72f5a35896e36657e2309 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 20 May 2019 12:49:56 +0000 Subject: [PATCH] color plane: Don't allocate 0-size textures This triggers critials, and does us no good. --- gtk/gtkcolorplane.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index 17f658c9ac..8cf817eb1a 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -129,6 +129,9 @@ create_texture (GtkColorPlane *plane) width = gtk_widget_get_width (widget); height = gtk_widget_get_height (widget); + if (width == 0 || height == 0) + return; + g_clear_object (&plane->priv->texture); stride = width * 4; -- 2.30.2